package com.itheima.mapper;

import com.itheima.pojo.Permission;
import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface RoleMapper {

    List<Role> findByCondition(@Param("queryString") String queryString);

    void add(Role role);

    Role findById(@Param("id") Integer id);

    void edit(Role role);

    void deleteById(@Param("id") Integer id);

    List<Permission> findAll();

    void setRoleAndPermission(@Param("permissionIds") Integer[] permissionIds, @Param("id") Integer id);

    List<Integer> findpermissionIdsByRoleId(@Param("id") Integer id);

    void deleteAssociation(@Param("id") Integer id);
}
